% Import data from spreadsheet
%
pos = xlsread('SingleAxisData.csv','SingleAxisData','A1:A5000');
vel = xlsread('SingleAxisData.csv','SingleAxisData','B1:B5000');
acc = xlsread('SingleAxisData.csv','SingleAxisData','C1:C5000');
torque = xlsread('SingleAxisData.csv','SingleAxisData','D1:D5000');

posD = xlsread('SingleAxisData.csv','SingleAxisData','E1:E5000');
velD = xlsread('SingleAxisData.csv','SingleAxisData','F1:F5000');
accD = xlsread('SingleAxisData.csv','SingleAxisData','G1:G5000');
torqueD = xlsread('SingleAxisData.csv','SingleAxisData','H1:H5000');

posDD = xlsread('SingleAxisData.csv','SingleAxisData','I1:I5000');
velDD = xlsread('SingleAxisData.csv','SingleAxisData','J1:J5000');
accDD = xlsread('SingleAxisData.csv','SingleAxisData','K1:K5000');
torqueDD = xlsread('SingleAxisData.csv','SingleAxisData','L1:L5000');

clearvars raw;

figure

subplot(4,1,1);
%plot(0:1:(length(j1)-1),j1,'LineWidth',2);
plot(0:1:(length(pos)-1),pos,   'LineWidth',2);
grid on
legend('position')

subplot(4,1,2);
%plot(0:1:(length(j1)-1),j1,'LineWidth',2);
plot(0:1:(length(vel)-1),vel, 0:1:(length(posD)-1),posD,   'LineWidth',2);
grid on
legend('vel', 'posD')

subplot(4,1,3);
%plot(0:1:(length(j1)-1),j1,'LineWidth',2);
plot(0:1:(length(acc)-1),acc, 0:1:(length(velD)-1),velD, 0:1:(length(posDD)-1),posDD, 'LineWidth',2);
grid on
legend('acc', 'velD' ,'posDD')

subplot(4,1,4);
%plot(0:1:(length(j1)-1),j1,'LineWidth',2);
plot(0:1:(length(torque)-1),torque,   'LineWidth',2);
grid on
legend('torque')



